package cn.myfirefly.moming.portal.filter;

import java.util.Map;

import cn.myfirefly.moming.portal.service.LoginService;
import cn.myfirefly.core.filter.MyFireflyFilter;
import cn.myfirefly.core.model.Permission;
import cn.myfirefly.utils.SpringContextUtil;

public class DefaultPortalFilter extends MyFireflyFilter {

	public Map<String, Permission> getPermissions(String loginName) {
		LoginService loginService = (LoginService)SpringContextUtil.getBean("loginService");
		if (loginService != null) {
			return loginService.getPermissions(1, loginName);
		}
		return null;
	} 
}
